function foo() {

}

const fooProxy = new Proxy(foo, {
  apply: function(target, thisArg, argArray) {
    console.log(target, thisArg, argArray)
    console.log("对apply监听");
    target.apply(thisArg, argArray)
  },
  construct: function(target, argArray, newTarget) {
    console.log("new调用");
    return new target(...argArray)
  }
    
})

fooProxy.apply({name: "yz"}, ["a", "b"])
new fooProxy()

